package com.ichengzi.audit.human.core.live.controller;

import com.ichengzi.audit.human.common.redis.service.RedisService;
import com.ichengzi.audit.human.core.live.service.LiveAuditTaskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;


/**
 * <p>
 * 任务数据表 前端控制器
 * </p>
 *
 * @author mybatis-plus generator
 * @since 2023-10-11
 */
@RestController
@RequestMapping("/liveAuditTask")
public class LiveAuditTestController {

    @Autowired
    private LiveAuditTaskService liveAuditTaskService;

    @Autowired
    private RedisService redisService;

    @ResponseBody
    @RequestMapping("get")
    public ModelMap get(){
        ModelMap map = new ModelMap();
        map.put("data", liveAuditTaskService.getById(1));
        return map;
    }

    @GetMapping("/testRedisDel")
    public boolean testRedisDel(){
        boolean testNum = redisService.deleteObject("testNum");
        return testNum;
    }

}
